import getState from "@/api/state";
import FxqData from "@/component/fxq/data";
import ZuirealTimeData from "@/template/realTimeData/realTimeData";
import { getRandomMath } from "@/utils/math";
import React from "react";
import { useEffect } from "react";
import { useState } from "react";

const FxqModule2 = ({ condition }) => {
    const [message, setMessage] = useState("");
    const [loading, setLoading] = useState(true);
    const [state, setState] = useState([
        {
            title: "风险客户数量",
            value: 0,
            unit: "人",
            childrenData: [

            ]

        },
        {
            title: "监管人员数量",
            value: 0,
            unit: "人",
            childrenData: [

            ]

        },
        {
            title: "可疑交易数量",
            value: 0,
            unit: "笔",
            childrenData: [

            ]
        },
        {
            title: "大额交易数量",
            value: 0,
            unit: "笔",
            childrenData: [

            ]
        },
        {
            title: "外国政要及关系人数量",
            value: 0,
            unit: "人",
            childrenData: [

            ]
        },
        {
            title: "高风险国家或地区客户数量",
            value: 0,
            unit: "人",
            childrenData: [

            ]
        },
    ])

    useEffect(() => {
        getState({
            moduleName: "fxqState",
            apiUrl: "/cifgp-core-api/fxqQuery/fxqState",
            condition: { ...condition, cType: "fxqState", dateType: "tYear" },
            setState,
            state,
            setLoading,
            setMessage,
        })
    }, [condition])




    return (
        <>
            <ZuirealTimeData
                message={message}
                loading={loading}
                style={{ width: "60%" }}
                title="反洗钱信息"
                hideBtn
                hideDownBtn
                transparent
                wrap
                itemStyle={{ width: "33.3333%" }}
                data={state}
            />
        </>
    )
}
export default FxqModule2;